package com.GroupSix.entity;

import com.GroupSix.tool.ArrayIntegerTypeHandler;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("practice")
public class PracticeEntity {
    //训练题id
    @TableId(type = IdType.AUTO)
    private Long Id;

    //训练科目
    private String courseName;

    //题目总数
    private Integer questionSum;

    //题目列表
    @TableField(typeHandler = ArrayIntegerTypeHandler.class)
    private Integer[] questions;

    //难度等级
    private Integer difficultyLevel;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    //是否有效
    private Integer isActive;
}
